debug { 
    DESTDIR = debug
    MOC_DIR = obj/debug/moc
    OBJECTS_DIR = obj/debug
    UI_DIR = obj/debug/ui
    DEFINES += DEBUG \
        _DEBUG
}
release { 
    DESTDIR = release
    MOC_DIR = obj/release/moc
    OBJECTS_DIR = obj/release
    UI_DIR = obj/release/ui
    DEFINES += NDEBUG
}
TARGET = qtcgen
TEMPLATE = app
CONFIG += console
QT -= core \
    gui
SOURCES += main.cpp \
    assembler.cpp \
    objects.cpp \
    allocation.cpp \
    base.cpp \
    builtins.cpp \
    runtime.cpp \
    handles.cpp \
    serialize.cpp \
    heap.cpp \
    log.cpp \
    counters.cpp \
    checks.cpp \
    utils.cpp \
    flags.cpp
HEADERS += assembler.h \
    base.h \
    objects.h \
    allocation.h \
    builtins.h \
    runtime.h \
    handles.h \
    serialize.h \
    heap.h \
    log.h \
    memory.h \
    counters.h \
    checks.h \
    utils.h \
    flags.h \
    cpu.h
INCLUDEPATH += .
*-g++* { 
    CONFIG -= warn_off
    CONFIG -= warn_on
    QMAKE_CFLAGS += -Wall \
        -W \
        -Wno-unused \
        -Wno-comment
    
    # QMAKE_CXXFLAGS += -Wall -W -Wno-unused -Wno-comment
    QMAKE_CXXFLAGS += -Wall \
        -W \
        -Wno-unused
}

# this is to make QtCreator able to find out standard includes, such as stdlib.h, stdint.h, etc.
# INCLUDEPATH += /usr/include \
# /usr/include/linux
linux-*:

# ia32-bit systems
win32-* {
    DEFINES += V8_HOST_ARCH_32_BIT
    include(ia32/ia32.pri)
}

# x64-bit systems
linux-*-64 { 
    DEFINES += V8_HOST_ARCH_64_BIT
    include(x64/x64.pri)
}
OTHER_FILES += templates.txt
